#!/bin/bash
pIDa=`lsof -i :3000|grep -v "PID" | awk '{print $2}'`
echo $pIDa
echo "结果如何" + $pIDa
if [ "$pIDa" != "" ];then
  sudo kill -9 $(sudo lsof -t -i:3000)
fi
cd /home/yu/jenkins_home/workspace/nodejs/demos
nohup node 02.js >/dev/null 2>&1&
echo "结束"